package structural.decorator.v1;

/**
 * @Author: 蔡翔
 * @Date: 2019/12/9 10:41
 * @Version 1.0
 *
 * 用 继承 实现 “装饰者模式”（有缺陷）
 */
public class Test {
    public static void main(String[] args) {
        BatterCake batterCake = new BatterCake();
        System.out.println(batterCake.getDesc()+"销售价格："+batterCake.cost());

        BatterCake batterCakeEgg = new BatterCakeWithEgg();
        System.out.println(batterCakeEgg.getDesc()+"销售价格："+batterCakeEgg.cost());

        BatterCake batterCakeEggSauage = new BatterCakeWithSausage();
        System.out.println(batterCakeEggSauage.getDesc()+"销售价格："+batterCakeEggSauage.cost());

    }
}
